<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String url=request.getHeader("Referer");//get the request url
	System.out.println("qq1q:"+url);
	session.setAttribute("url",url);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'login.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta property="qc:admins" content="137116066767522516375" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
	<script>
	
		function back(m){
		
			if(m==1){
				alert("账户不存在");
			}else if(m==2){
			//alert($("#url").val());
				location.replace($("#url").val());
				return false;
			}
		}
		function showToggle(){
			$('#dd').toggle();
		}
		function submitform(){
			var email=$("#mail").val();
			var pwd=$("#password").val();
			if(email==""||email==null){
				alert("email不能为空");
			}else if(pwd==null||pwd==""){
				alert("密码不能为空");
			}else{
				var e=document.getElementById("jizhu");
				if(e.checked){
					$("#flag").val("1");
				}else{
					$("#flag").val("0");
				}
				alert("www");
				$("#myform").submit();
			}
			
			
				
			
		}
	</script>
</head>
<body>
	<input type="hidden" id="url" value="${url}">
	<font style="text-align: center;">你可以直接用以下方式登录：</font>
	<br />
	<a href=""><img style="width:50px;height:60px" src="img/qq.jpg">
	</a>
	<br />
	<font>-----------------------------------------或-------------------------------------</font>
	<br />
	<a href="javascript:void(0);"
		onclick="showToggle();" style="text-align: center;margin:auto;">使用网贝账号登陆</a>
	<br />
	<br />
	<div style="display: none" id="dd">
		<form action="wblogin" method="post" id="myform" target="hidden_iframe">
		
			<div style="background-color:#CCCCCC; width: 250px;height: 250px;">
				<div>
					<span style="padding-left: 10px;">邮箱</span><br/>
					<span style="padding-left: 10px;"><input type="text" name="mail" id="mail" size="30"></span><br/>
					<span style="padding-left: 10px;">密码</span><br/>
					<span style="padding-left: 10px;"><input type="password" id="password" name="password" size="30"></span><br/>
					<span style="padding-left: 10px;"><input type="button" value="登录" onclick="submitform()" style="color: red; font-weight: bold;"></span>
					<span><input type="checkbox" name="jizhu" id="jizhu" value="cheng" checked="checked"><font size="2">记住密码</font></span>
					<span><a style="text-decoration: none;" href="findpassword.jsp"><font size="2">找回密码</font></a></span><br/>
					<span><input type="hidden" id="flag" name="flag" value="1"></span>
				</div>
				<div>
					<br/>
					<span style="padding-left: 10px;">用其他账号方式登入</span><br/>
					<span style="padding-left: 10px;"><img src="img/baidutieba.png"/></span>
					<span><img src="img/baidutieba.png"/></span>
					<span><img src="img/baidutieba.png"/></span>
					<span><img src="img/baidutieba.png"/></span>
				</div>
				<div>
					<br/>
					<span style="padding-left: 10px;"><font size="2" color="blue">温馨提示，未经注册不能保存定制产品，敬请</font>
					<a href="register.jsp"><font size="2" color="red">注册</font> </a></span>
				</div>
			</div>
			<iframe id="hidden_iframe" name="hidden_iframe" style="display: none;"></iframe>
		</form>
	</div>
</body>
</html>
